package com.shark.commons.spring.mail;

import java.io.File;
import java.io.Serializable;

import com.shark.commons.utils.PropertyUtils;

/**
 * 邮件载体
 * @author Administrator
 *
 */
public class MailBean implements Serializable {
	private static final long serialVersionUID = 1L;

	//默认的发件人
	private static String default_from = null ;
	
	static {
		default_from = PropertyUtils.getValue("mail.from");
	}
	
	//发送人
	private String from ;

	//收件人
	private String to ;
	
	//抄送人
	private String cc ;
	
	//暗送人
	private String bcc ;
	
	//邮件标题
	private String subject ;
	
	//邮件内容
	private String content ;
	
	//附件，文件数组对象
	private File[] attachments ;
	
	//附件，路径数组
	private String[] attachmentsArray ;
	
	//附件，多个附件用;号分割路径
	private String attachmentsString ;

	public String[] getAttachmentsArray() {
		return attachmentsArray;
	}

	public void setAttachmentsArray(String[] attachmentsArray) {
		this.attachmentsArray = attachmentsArray;
	}

	public String getAttachmentsString() {
		return attachmentsString;
	}

	public void setAttachmentsString(String attachmentsString) {
		this.attachmentsString = attachmentsString;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getFrom() {
		if(null == from) {
			this.setFrom(default_from);
		}
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

	public String getCc() {
		return cc;
	}

	public void setCc(String cc) {
		this.cc = cc;
	}

	public String getBcc() {
		return bcc;
	}

	public void setBcc(String bcc) {
		this.bcc = bcc;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public File[] getAttachments() {
		return attachments;
	}

	public void setAttachments(File[] attachments) {
		this.attachments = attachments;
	}
}
